package top.wfzzq.ds;

import java.util.LinkedList;
import java.util.Queue;
/***
 * 队列
 * @author wanghui
 *
 */
public class MyQueueDemo {
       public static void main(String[] args) {
		MyQueue<Integer> queue=new MyQueue<>();
		System.out.println(queue.isEmpty());
		System.out.println(queue.size());
		queue.offer(100);
		queue.offer(200); 
		System.out.println(queue.isEmpty());
		System.out.println(queue.size());
		System.out.println(queue.peek());
		System.out.println(queue.poll());
		System.out.println(queue.poll());
		queue.offer(300);
		System.out.println(queue.poll());
		System.out.println("系统的队列");
		Queue<Integer> q=new LinkedList<>();
		q.offer(100);
		q.offer(200);
		q.offer(300);
		System.out.println(q.peek());
		System.out.println(q.poll());
		System.out.println(q.poll());
	}
}
